package com.fuxin.hanfu.service;

import com.fuxin.hanfu.domain.Knowledge;
import com.fuxin.hanfu.mapper.KnowledgeMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class KnowledgeService {
    @Resource
    private KnowledgeMapper knowledgeMapper;
    public List<Knowledge> findList(Knowledge knowledge){return knowledgeMapper.selectByExample(null);
    }
    public Knowledge findById(Integer id) { return knowledgeMapper.findById(id);
    }

    public Integer insert(Knowledge knowledge) { return knowledgeMapper.insert(knowledge);
    }

    public Integer update(Knowledge knowledge) {return knowledgeMapper.update(knowledge);
    }

    public Integer delete(Integer id) { return knowledgeMapper.delete(id);
    }
}
